import java.io.File;

public class Main {
    public static void main(String[]args){

        File file = new File("D:\\壁纸\\kdesk\\ressrc\\chs");

        System.out.println(file.getName());

        System.out.println(file.getPath());

        System.out.println(file.getAbsolutePath());

        System.out.println(file.getParent());

        System.out.println(file.canRead()?"可读":"不可读");

        System.out.println(file.canWrite()?"可写":"不可写");

        System.out.println(file.isFile()?"是文件":"不是一个文件");

        System.out.println(file.isDirectory()?"是绝对路径":"不是绝对路径");

        System.out.println(file.lastModified());

        System.out.println(file.length());

        System.out.println(file.delete());
        //------------

    }
}


























